from utils.database import db

class Card(db.Model):
    __tablename__ = 'cardinfo'
    
    card_id = db.Column(db.String(17), primary_key=True)
    cur_id = db.Column(db.String(10))
    saving_id = db.Column(db.Integer)
    open_date = db.Column(db.DateTime)
    open_money = db.Column(db.Numeric(18, 2))
    balance = db.Column(db.Numeric(18, 2))
    password = db.Column(db.String(6))  # 修改pass为password
    is_report_loss = db.Column(db.String(3))
    customer_id = db.Column(db.Integer, db.ForeignKey('userinfo.customer_id'))